package com.lucweb.entity;

import javax.persistence.*;

@Entity
@Table(name = "task_tz", schema = "firesystem", catalog = "")
public class TaskTz {
    private int id;
    private String tzName;
    private String tzContext;

    @Id
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "tzName", nullable = true, length = 255)
    public String getTzName() {
        return tzName;
    }

    public void setTzName(String tzName) {
        this.tzName = tzName;
    }

    @Basic
    @Column(name = "tzContext", nullable = true, length = -1)
    public String getTzContext() {
        return tzContext;
    }

    public void setTzContext(String tzContext) {
        this.tzContext = tzContext;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaskTz taskTz = (TaskTz) o;

        if (id != taskTz.id) return false;
        if (tzName != null ? !tzName.equals(taskTz.tzName) : taskTz.tzName != null) return false;
        if (tzContext != null ? !tzContext.equals(taskTz.tzContext) : taskTz.tzContext != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (tzName != null ? tzName.hashCode() : 0);
        result = 31 * result + (tzContext != null ? tzContext.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "TaskTz{" +
                "id=" + id +
                ", tzName='" + tzName + '\'' +
                ", tzContext='" + tzContext + '\'' +
                '}';
    }
}
